
/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');


import BootstrapVue from 'bootstrap-vue';

Vue.use(BootstrapVue);
import 'bootstrap-vue/dist/bootstrap-vue.css'

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

Vue.component('user-component', function (resolve) {
  require(['./components/UserComponent.vue'], resolve)
});
Vue.component('role-component', function (resolve) {
  require(['./components/RoleComponent.vue'], resolve)
});
Vue.component('operation-component', function (resolve) {
  require(['./components/OperationComponent.vue'], resolve)
});
Vue.component('restype-component', function (resolve) {
  require(['./components/ResTypeComponent.vue'], resolve)
});
Vue.component('resource-component', function (resolve) {
  require(['./components/ResourceComponent.vue'], resolve)
});

Vue.component('menu-component', function (resolve) {
  require(['./components/MenuComponent.vue'], resolve)
});

Vue.component('writer-component',function (resolve) {
  require(['./components/WriterComponent.vue'], resolve)
});

jQuery(function(){
    var path=location.pathname;
    path='.menu'+path.replace(/\//g,'-');
    console.log(path);
    jQuery(path).addClass('active');
})

const app = new Vue({
    el: '#app',
});